<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta name="robots" content="noindex,nofollow">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link  href="img/style.css" rel="stylesheet" type="text/css" />
<title>高级工具</title>
<script src="js/common.js" type="text/javascript"></script>
<script src="js/main.js" type="text/javascript"></script>
</head>
<body>
<!--当前导航-->
<script type="text/JavaScript">if(parent.$('admincpnav')) parent.$('admincpnav').innerHTML='后台首页&nbsp;&raquo;&nbsp;数据&nbsp;&raquo;&nbsp;临时表 ';</script>

<div class="r_main">
<div class="r_content">
	<div class="r_content_1">
<?php
$numPerPage=30;
$page = isset($page) ? intval($page) : 1;
if($page==0) $page=1;
$csqlStr="select count(*) as dd from `sea_temp`";
$row = $dsql->GetOne($csqlStr);
if(is_array($row)){
$TotalResult = $row['dd'];
}else{
$TotalResult = 0;
}
$TotalPage = ceil($TotalResult/$numPerPage);
if ($page>$TotalPage) $page=$TotalPage;
$limitstart = ($page-1) * $numPerPage;
if($limitstart<0) $limitstart=0;
$sqlStr="select v_id,v_name,tid,v_actor,v_addtime from `sea_temp` order by v_addtime desc limit $limitstart,$numPerPage";
?>
<form action="?action=delall" method="post" name="tempdataform">

<table border="0" cellpadding="0" cellspacing="0" align="center" class="tb">
    <tr class="thead"><td colspan="15" class="td_title">临时表管理&nbsp;&nbsp;<a href="?action=delall&do=all" onclick="if(confirm('确定要删除所有吗')){return true;}else{return false;}"><u>清空临时表</u></a></td></tr>
    <TR>
      <TD  align="center">ID</TD>
      <TD align="center">名称</TD>
       <TD align="center">演员</TD>
       <TD  align="center">添加时间</TD>
      <TD   align="center">操作</TD>
    </TR>
<?php
$dsql->SetQuery($sqlStr);
$dsql->Execute('temp_list');
while($row=$dsql->GetObject('temp_list'))
{
$aid=$row->v_id;
?>
    <tr id="adtr<?php echo $aid;?>" name="adtr"  >
      <td  align="center"><input type="checkbox" class="checkbox" value="<?php echo $aid;?>" name="e_id[]"/><?php echo $aid;?></TD>
      <td align="center"><?php echo $row->v_name;?></TD>
      <td  align="center" title="<?php echo $row->v_actor;?>" ><?php echo cn_substr($row->v_actor,20);?></TD>
      <td  align="center"><?php echo isCurrentDay($row->v_addtime);?></TD>
      <td   align="center"><a href="?action=edit&id=<?php echo $aid;?>">编辑</a>&nbsp;&nbsp;<a href="?action=del&id=<?php echo $aid;?>" onclick="if(confirm('确定要删除吗')){return true;}else{return false;}">删除</a></TD>
    </tr>
<?php
}
?>
    <tr>
    <td colspan="7"><div class="cuspages"><div class="pages">全选<input type="checkbox" name="chkall" id="chkall" class="checkbox" onclick="checkAll(this.checked,'input','e_id[]')" />反选<input type="checkbox" name="chkothers" id="chkothers" class="checkbox" onclick="checkOthers('input','e_id[]')" />
    <select name="type" id="type"  ><option value="">请选择数据分类</option>
    <?php makeTypeOption(0,"&nbsp;|&nbsp;&nbsp;");?>
	</select>
    
    <input type="submit" value="导入到数据表" onclick="tempdataform.action='?action=import';" class="rb1"  />
	<input type="submit" value="批量删除" onclick="if(confirm('确定要批量删除吗')){return true}else{return false}" class="rb1"  />
    &nbsp;&nbsp; 页次<?php echo $page;?>/<?php echo $TotalPage;?> 每页<?php echo $numPerPage;?> 总收录数据<?php echo $TotalResult;?>条 <a href="?page=1">首页</a> <a href="?page=1">首页</a> <a href="?page=<?php echo ($page-1);?>">上一页</a> <?php echo makePageNumber($page, 8, $TotalPage, "adslist");?> <a href="?page=<?php echo ($page+1);?>">下一页</a> <a href="?page=<?php echo $TotalPage;?>">尾页</a></div></div></td></tr>
    
</TABLE>
</form> 
	</div>
</div>
</div>

<?php
viewFoot();
?>

</body>
</html>